from rest_framework.permissions import IsAdminUser
from rest_framework.viewsets import ModelViewSet
from goods.models import Brand
from meiduo_admin.serializers.brands import BrandSerializers
from meiduo_admin.utils import PageNum


class BrandlView(ModelViewSet):
    serializer_class = BrandSerializers
    queryset = Brand.objects.all()
    pagination_class = PageNum
    permission_classes = [IsAdminUser]